package com.woniuxy.searchassembly.service.impl;

import com.woniuxy.searchassembly.model.SubwayPoint;
import com.woniuxy.searchassembly.dao.SubwayPointMapper;
import com.woniuxy.searchassembly.service.ISubwayPointService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Kevin Kwok
 * @since 2021-05-24
 */
@Service
public class SubwayPointServiceImpl extends ServiceImpl<SubwayPointMapper, SubwayPoint> implements ISubwayPointService {

    @Resource
    private SubwayPointMapper subwayPointMapper;

    @Override
    public List<String> queryByRouteNo(Integer routeNo) {
        List<String> strings = subwayPointMapper.queryByRouteNo(routeNo);
        return strings;
    }

    @Override
    public List<SubwayPoint> queryAllInfo(String routeName) {
        List<SubwayPoint> subwayPoint = subwayPointMapper.queryAllInfo(routeName);
        return subwayPoint;
    }

    @Override
    public int addNewSites(SubwayPoint subwayPoint) {
        int i = subwayPointMapper.addNewSite(subwayPoint);
        return i;
    }
}
